<#assign resources="${rc.contextPath}/resources">
<#assign path="${rc.contextPath}">
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>微银行</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
   		<script type="text/javascript">
		    var path = "${path}";
	 	</script>  
		<script src="${resources}/plugins/jquery/2.2.2/jquery.min.js" type="text/javascript" ></script>
		<script src="${resources}/plugins/wechat/jweixin-1.0.0.js"></script>
		<script src="${resources}/plugins/wechat/wechat.js"></script>
	<script type="text/javascript">
			//微信设置
			var corpid = '${corpid}';
			var openid= '${openid}';
		    var headimgurl = '${headimg}';
		    var nickname = '${nickname}'; 
		    var memberId = '${memberid}';
		    var scopeEnum='${scopeEnum}';
			//微信浏览器登陆 
			if(isWeixin()){
			  		var newUrl = '${reqUrl}';
			  		if(newUrl.lastIndexOf('?')>0){
						newUrl+="&";
					}
					if(newUrl.lastIndexOf('?')==-1){
						newUrl+="?";
					}
					newUrl+="memberId=${memberid}&openid=${openid}&corpid=${corpid}";
					if(parseInt(scopeEnum)==2){
						newUrl+="&nickname=${nickname}&headimgurl=${headimg}";
					}
				    window.location.replace(newUrl);
					//alert("ssss------------"+newUrl);
		    }
		</script>
</head>
<body>
<input value="${reqUrl}">
</body>
</html>